package com.jh.user.pojo.enums;

public enum BaseEnums {
    TRUE(1, "成功"),
    FALSE(2, "失败");

    BaseEnums(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private int value;

    private String desc;


    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDesc(int value) {
        BaseEnums[] dataEnums = BaseEnums.values();
        for (BaseEnums data : dataEnums) {
            if (data.getValue()== value ) {
                return data.getDesc();
            }
        }
        return "";
    }
}
